package com.fqgj.sentry.controller.mc.request;

import com.fqgj.common.utils.CollectionUtils;
import com.fqgj.sentry.common.exception.BizException;
import com.fqgj.sentry.common.exception.enums.ErrorCodeEnums;
import com.fqgj.sentry.common.request.ParamsObject;

import java.util.List;

/**
 * Created by ykpbean kangping.ying@yuntu-inc.com
 *
 * @description
 * @create 2017-07-21 下午5:08
 */


public class ModifyGroupManagerVo extends ParamsObject {
    private Long groupManagerId;
    private List<Long> roleId;

    @Override
    public void validate() {
        if (groupManagerId == null || CollectionUtils.isEmpty(roleId)) {
            throw new BizException(ErrorCodeEnums.param_valid_error,"权限组必须要有应用和角色");
        }
    }

    public Long getGroupManagerId() {
        return groupManagerId;
    }

    public ModifyGroupManagerVo setGroupManagerId(Long groupManagerId) {
        this.groupManagerId = groupManagerId;
        return this;
    }

    public List<Long> getRoleId() {
        return roleId;
    }

    public ModifyGroupManagerVo setRoleId(List<Long> roleId) {
        this.roleId = roleId;
        return this;
    }
}
